package com.marvels.common.dto;

import java.util.Date;
import java.util.Properties;

/**服务Properties文件加载DTO
 * @author hejie
 */
public class ServerPropertiesDTO {
	
	/**
	 *文件名称 
	 */
	private String fileName;
	
	/**
	 *最近一次加载时间 
	 */
	private Date loadTime = new Date();
	
	/**
	 * 间隔时间加载（分钟）
	 */
	private Integer min = 5;
	/**
	 * 数据
	 */
	private Properties prop  = new Properties();
	
	public ServerPropertiesDTO() {
		super();
	}
	public ServerPropertiesDTO(String fileName, Date loadTime) {
		super();
		this.fileName = fileName;
		this.loadTime = loadTime;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public Date getLoadTime() {
		return loadTime;
	}
	public void setLoadTime(Date loadTime) {
		this.loadTime = loadTime;
	}
	public Properties getProp() {
		if(prop == null) {
			prop = new Properties();
		}
		return prop;
	}
	public void setProp(Properties prop) {
		this.prop = prop;
	}
	public Integer getMin() {
		return min;
	}
	public void setMin(Integer min) {
		this.min = min;
	}
	public void setMin(String min) {
		try {
			this.min = Integer.parseInt(min);
		} catch (NumberFormatException e) {
			
		}
	}
	
	
}
